﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Cookie : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.Cookies["username"] != null)
        {
            Label1.Text = "Cookie的值为："+Request.Cookies["username"].Value;
        }
        else {
            Response.Redirect("~/CookieLogin.aspx");
        }
    }
}